<script type="text/ng-template" id="template-business.html">
    <h3>业务类型管理</h3>

    <hr>

    <!-- <div class="panel panel-default">
		<div class="panel-body">
			<div class="row">
				<div class="col-sm-2" ng-show="!editing">
					<button class="btn btn-primary btn-sm" ng-click="editing=true;">
						<i class="fa fa-plus"></i> 添加类型
					</button>
				</div>
				<div class="col-sm-4" ng-show="editing">
					<div class="input-group input-group-sm">
					   	<span class="input-group-addon">业务名称</span>
					   	<input type="text" class="form-control" ng-model="newType.typename">
					   	<div class="input-group-btn">
					   		<button class="btn btn-success">完成</button>
					   	</div>
					</div>
				</div>
				<div class="sol-sm-2" ng-show="editing">
					<button class="btn btn-default btn-sm" ng-click="editing=false;">取消</button>
				</div>
			</div>
		</div>
    </div>
    -->

    <div class="container-fluid">
	    <div class="row">
	    	<div class="col-sm-4" style="max-height: 600px; overflow-y: auto;">
	    		<p>当前共有 <strong>{{ typeCount }}</strong> 类业务（目前只提供“修改”功能）</p>
	    		<div class="list-group" id="business-type-list">
					<a href="javascript: void(0);" class="list-group-item" ng-class="{active: type.id==selected.id}" ng-click="getType(type.id, $event)" ng-repeat="type in typeList">
						{{ type.typename }}
					</a>
	    		</div>
	    	</div>

	    	<div class="col-sm-4" ng-show="!!selected && !editing">
	    		<p>业务详情：</p>
	    		<p class="input-group">
	    			<span class="input-group-addon">业务名称</span>
	    			<input type="text" class="form-control" ng-model="selected.typename">
	    		</p>
	    		<p class="text-muted">
	    		备注说明（100字以内）：
	    		</p>
	    		<textarea class="form-control" rows="5" ng-model="selected.remark"></textarea>
	    		
	    		<hr>
	    		<div style="text-align: right;">
	    			<button class="btn btn-default btn-sm" ng-click="selected=null">
	    				取消
	    			</button>
	    			<button class="btn btn-success btn-sm" ng-click="saveType(selected.id)">
	    				<i class="fa fa-floppy-o"></i> 保存
	    			</button>
	    		</div>
	    	</div>

	    </div>
    </div>
</script>